const billModel = require('../models/BillModel')

let billController = {
    get_index: function (req, res) {
        billModel.incomepay_render(req, res)
    },
    /**
     * 收入或支出的存储
     * @param {*} req 
     * @param {*} res 
     */
    post_add: function(req, res){
        billModel.incomepay_add(req, res)
    },
    get_money: function(req, res){
        billModel.incomepay_money(req, res)
    },
    post_del: function(req, res){
        billModel.incomepay_del(req, res)
    },
    /**
     * 获取收入或支出类型
     * @param {*} req 
     * @param {*} res 
     */
    get_tpye: function (req, res) {
        billModel.show_type(req, res)
    }
    
}

module.exports = billController
